package com.leyou.service;

import com.leyou.common.vo.PageResultVO;
import com.leyou.item.dto.SkuDTO;
import com.leyou.item.dto.SpuDTO;
import com.leyou.item.dto.SpuDetailDTO;

import java.util.List;
import java.util.Map;


/**
 * @author xiuer
 * @date 2019/6/27 21:37
 */
public interface GoodsService {
    PageResultVO<SpuDTO> goodsQueryPage(String key, Boolean saleable, Integer page, Integer rows);

    void insertGoods(SpuDTO spuDTO);

    void updateGoods(SpuDTO spuDTO);

    void updateSaleableBySkuId(Long id, Boolean saleable);

    SpuDetailDTO selectSpuDetail(Long id);

    List<SkuDTO> selectSku(Long id);

    SpuDTO querySpuById(Long id);

    List<SkuDTO> querySkuByIds(List<Long> ids);

    void minusStock(Map<Long, Integer> numCartMap);
}
